#include "configwindow.h"
#include <QtGui>

int main(int argc, char *argv[])
{

    Q_INIT_RESOURCE(qtomato);

    QApplication app(argc, argv);

    if (!QSystemTrayIcon::isSystemTrayAvailable()) {
        QMessageBox::critical(0, QObject::tr("Systray"),
                              QObject::tr("I couldn't detect any system tray "
                                          "on this system."));
        return 1;
    }


    QApplication::setQuitOnLastWindowClosed(false);

    //needed by phonon
    app.setApplicationName("qtomato");

    //maximize
    ConfigWindow w;
    w.setWindowFlags( Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);


    //centering
    QRect frect = w.frameGeometry();
    frect.moveCenter(QDesktopWidget().availableGeometry().center());
    w.move(frect.topLeft());

    w.show();

    return app.exec();
}
